package com.lu.manage.config.datasource;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program LuBoot
 * @description:
 * @author: zhanglu
 * @create: 2019-10-08 10:37:00
 */
@Configuration
@EnableTransactionManagement
@MapperScan(basePackages = {"com.lu.manage.modular.*.mapper"})
public class SingleDataSourceConfig {


    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

    @Bean
    public MyMetaObjectHandler objectHandler(){
        return new MyMetaObjectHandler();
    }

}
